<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
	  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="col-sm-12">
			<div class="ibox">
				<div class="ibox-body">
					<div class="fixed-table-toolbar">
						<div class="columns pull-left">
							<button type="button" class="btn  btn-primary" th:if="${#httpSession.getAttribute('org.apache.shiro.subject.support.DefaultSubjectContext_PRINCIPALS_SESSION_KEY').primaryPrincipal.deptId eq '1'}" onclick="add('1')">
								<i class="fa fa-plus" aria-hidden="true"></i>添加企业
							</button>
						</div>
						<div class="columns pull-right">
							<button class="btn btn-success" onclick="reLoadCx()">查询</button>
						</div>
						<input type="hidden" id="deptId" th:value="${deptId}">
						<input type="hidden" id="qylbId" th:value="${qylbId}">
						<div class="columns pull-right col-md-2">
							<input id="name" type="text" class="form-control"
								   placeholder="请输入名称">
						</div>
						<div class="columns pull-right col-md-2 nopadding">
						</div>
					</div>
					<table id="exampleTable" data-mobile-responsive="true" class="nborbot">
					</table>
				</div>
			</div>
		</div>
	</div>
	<script th:inline="javascript">
        var yhxxz = [[${#httpSession.getAttribute('org.apache.shiro.subject.support.DefaultSubjectContext_PRINCIPALS_SESSION_KEY')}]];
        var userIdRoot = yhxxz.primaryPrincipal.deptId;
	</script>
	<!--shiro控制bootstraptable行内按钮看见性 -->
		<div>
			<script type="text/javascript">
			    var s_add_h = 'hidden';
				var s_edit_h = 'hidden';
				var s_remove_h = 'hidden';
				var s_resetPwd_h = 'hidden';
			</script>
		</div>
		<div shiro:hasPermission="system:sysDept:edit">
			<script type="text/javascript">
				s_edit_h = '';
			</script>
		</div>
		<div shiro:hasPermission="system:sysDept:add">
			<script type="text/javascript">
				s_add_h = '';
			</script>
		</div>
		<div shiro:hasPermission="system:sysDept:remove">
			<script type="text/javascript">
				var s_remove_h = '';
			</script>
		</div>
		<div shiro:hasPermission="system:sysDept:resetPwd">
			<script type="text/javascript">
				var s_resetPwd_h = '';
			</script>
		</div>
	</div>
	<script type="text/javascript" th:src="${urls.getForLookupPath('/js/appjs/sys/dept/common_dept.js')}" src="/js/appjs/sys/dept/common_dept.js"></script>
</body>
</html>